﻿using ED.Common.Extensions;

namespace ED.Model.Response.Menu
{
    /// <summary>
    /// 返回菜单实体
    /// </summary>
    public class MenuRes
    {
        public List<MenuRoot> menuRoots { get; set; } = new List<MenuRoot>();
    }

    /// <summary>
    /// 菜单实体
    /// </summary>
    public class MenuRoot
    {
        public MenuRoot()
        {
          //  Children = new List<MenuRoot>();
            Meta = new Meta();
        }

        public string Path { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public string Redirect { get; set; }
        public string Title { get; set; }
        public Meta Meta { get; set; }
        public string Component { get; set; }
        public List<MenuRoot>? Children { get; set; }

        public int Id { get; set; }
    }

    /// <summary>
    /// 菜单Meta
    /// </summary>
    public class Meta
    {
        public string Title { get; set; }
        public string Icon { get; set; }
        public int Rank { get; set; }
        public string IsLink { get; set; }
        public bool IsHide { get; set; }
        public bool IsFull { get; set; }
        public bool IsAffix { get; set; }
        public bool IsKeepAlive { get; set; }

    }
}
